package sanmubird.club.spring.启动.bean;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class UserConfig {
    @Bean(name = "user1")
    public User1 user1() {
        User1 user = new User1();
        user.setName("张三");
        return user;
    }

    @Bean(name = "user2")
    public User2 user2() {
        User2 user = new User2();
        user.setName("李四");
        return user;
    }
}
